package com.project.server.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("dish")
@Schema(description = "菜品")
public class Dish {

    @TableId(type = IdType.AUTO)
    @Schema(description = "ID")
    private Long id;

    @Schema(description = "所属餐厅ID")
    private Long restaurantId;

    @Schema(description = "分类ID")
    private Long categoryId;

    @NotBlank(message = "菜品名称不能为空")
    @Schema(description = "菜品名称")
    private String name;

    @NotNull(message = "菜品价格不能为空")
    @Schema(description = "菜品价格")
    private BigDecimal price;

    @Schema(description = "图片")
    private String image;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "状态：0-下架 1-上架")
    private Integer status;

    @Schema(description = "销量")
    private Integer sales;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;






}
